//
//  YZProvinces.m
//  天气预报
//
//  Created by jacoy on 16/5/4.
//  Copyright © 2016年 jacoy. All rights reserved.
//

#import "YZProvinces.h"

@implementation YZProvinces
+(NSMutableArray *)provinces{
    NSArray *dicArry=[NSArray arrayWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"province.plist" ofType:nil]];
    NSMutableArray *modelArr=[NSMutableArray array];
    for (NSDictionary *dic in dicArry) {
        [modelArr addObject:[self provincesWithDic:dic]];
    }
    return modelArr.copy;
}
+(instancetype)provincesWithDic:(NSDictionary *)dic{
    return [[self alloc]initWithDic:dic];
}
-(instancetype)initWithDic:(NSDictionary *)dic{
    if(self=[super init]){
        [self setValuesForKeysWithDictionary:dic];
    }
    return self;
}
@end
